{extend name="base" /}

{block name="title"}会员列表{/block}

{block name="main"}
	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>会员列表 <small>萌宝联盟</small></h1>
			<ol class="breadcrumb">
				<li><a href="/shuashuale"><i class="fa fa-home"></i> 首页</a></li>
				<li><a href="/shuashuale/user"> 会员管理</a></li>
				<li class="active">会员列表</li>
			</ol>
		</section>

		<!-- Main content -->
		<section class="content container-fluid">
			<div class="box">
				<div class="box-header with-border">
					<h3 class="box-title">会员列表</h3>
					<div class="box-tools">
						<form method="get">
							<div class="input-group input-group-sm" style="width: 250px;">
								<input type="text" class="form-control pull-right" name="username" placeholder="输入会员账号">

								<div class="input-group-btn">
									<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!-- /.box-header -->
				<div class="box-body table-responsive no-padding">
					<table class="table table-bordered">
						<tr>
							<th>编号</th>
							<th>账号</th>
							<th>真实姓名</th>
							<th>手机号</th>
							<th>创建时间</th>
							<th>状态</th>
							<th>操作</th>
						</tr>
						{volist name='users' id='user'}
						<tr>
							<td>{$user.user_id}</td>
							<td>{$user.username}</td>
							<td>{$user.realname}</td>
							<td>{$user.phone}</td>
							<td>{$user.createtime|date='Y-m-d H:i:s',###}</td>
							{php}$status = ['正常', '待激活', '已注销', '已禁止', '已冻结'];{/php}
							<td>{$status[$user.status]}</td>
							<td>
								{neq name="user.user_id" value="1"}
								{switch name="user.status" }
									{case value="0"}
									<a class="btn btn-warning btn-xs btn-flat" href="/shuashuale/user/update/freeze?user_id={$user.user_id}&status=4">冻结</a>
									{/case}
									{case value="4"}
									<a class="btn btn-success btn-xs btn-flat" href="/shuashuale/user/update/freeze?user_id={$user.user_id}&status=0">解冻</a>
									{/case}
								{/switch}
								<a class="btn btn-danger btn-xs btn-flat" href="/shuashuale/user/delete?user_id={$user.user_id}">删除</a>
								{/neq}
								<a class="btn btn-primary btn-xs btn-flat" href="/shuashuale/user/update?user_id={$user.user_id}">修改</a>
								<a class="btn btn-info btn-xs btn-flat" href="/shuashuale/user/into?user_id={$user.user_id}" target="_blank">进入会员中心</a>
							</td>
						</tr>
						{/volist}
					</table>
				</div>
				<!-- /.box-body -->
				<div class="box-footer clearfix">
					{$users->render()}
				</div>
			</div>
		</section>
		<!-- /.content -->
	</div>
	<!-- /.content-wrapper -->
{/block}